<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="com.zbvc.dao.*,com.zbvc.dao.impl.*" %>    
<%@ page import="com.zbvc.entity.*,java.util.*" %>  
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">
   body{
    background-color: #ccc;
   }
 
</style>
</head>
<body>
		<!-- 
		   这个一个jsp页面，java动态网页技术，智能
		   写什么？ html css  js java 
		
		 -->
        <table border="1" cellspacing="0" cellpadding="0" width="900" align="center">
        	<tr>
        	   <td>编号</td>
        	   <td>姓名</td>
        	   <td>年龄</td>
        	   <td>操作</td>
        	</tr>
        	<%
        	  // java代码
        	  UserDao userDao = new UserDaoImpl();
        	  List<User> userdata = userDao.findAllUser();
        	  for(User user : userdata){
        	%>
            <tr>
        	   <td><%=user.getId() %></td>
        	   <td><%=user.getName() %></td>
        	   <td><%=user.getAge() %></td>
        	   <td>
        	      <button>修改</button>
        	      <button>删除</button>
        	   </td>
        	</tr>
        	<%
        	  }
        	%>
        	
        </table> 
		 
</body>
</html>